/* Copyright © 2020 liudong.li. All rights reserved. */
package com.liliudong.keelflower.common.core.utils;

import java.io.Serializable;

/**
 * RedisKey工具类
 *
 * @author Liudong.li
 * @version 1.0
 * @date 2021-06-08 15:10
 */
public class CacheUtils {

    public static class SysUser {
        private final static String BASE_KEY = "admin:sys_user:";
        public final static long EXPIRE_TIME = 7200L;
        public final static String USER = "user";
        public final static String ROLES = "roles";
        public final static String MENUS = "menus";

        public static String user(Serializable userId) {
            return BASE_KEY + "id:" + userId;
        }

        public static String token(String token) {
            return BASE_KEY + "token:" + token;
        }
    }
}
